import request from '@/utils/request'
const api_name_train = '/train'
export default {
  // 根据课程id 查询出课程的信息
  findTrainById(trainId) {
    return request({
      url: `${api_name_train}/findTrainById/${trainId}`,
      method: 'get'
    })
  },
  //获得当前课程的所有学员信息
  findTrainUser(trainId, currentPage, pageSize) {
    return request({
      url: `${api_name_train}/findTrainUser/${trainId}/${currentPage}/${pageSize}`,
      method: 'get'
    })
  },
  //通过用户培训表的id 更改状态
  verifyUser(status, ids) {
    return request({
      url: `${api_name_train}/verifyUser/${status}`,
      method: 'post',
      data: ids
    })
  },
  findTrainUserScore(trainSearch, currentPage, pageSize) {
    return request({
      url: `${api_name_train}/findTrainUserScore/${currentPage}/${pageSize}`,
      method: 'post',
      data: trainSearch
    })
  }
}

